/******************************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Ltd                        */
/*                                                                            */
/*  NAME               informix_base_type.h                                   */
/*  NOTE                                                                      */
/*  DATE               2015/08/26 by zhengxd                                  */
/******************************************************************************/
#ifndef _INFORMIX_BASE_TYPE_H_
#define _INFORMIX_BASE_TYPE_H_

#include "frmem.h"
#include "frstr.h"
#include "frcomm.h"
#include "frlist.h"
#include "frhash2.h"
#include "frlog.h"
#include "iconv2utf8.h"
#include "frsutl.h"
#include "frvar_field.h"
#include "frhex_dump.h"

#include "conntrack.h"
#include "module.h"
#include "frct_comm.h"
#include "frreport_comm.h"
#include "frbyte_buffer.h"

/* zookeeper */
#define ZOOKEEPER_HEAD_LEN                   4
#define ZOOKEEPER_XID_LEN                    4
#define ZOOKEEPER_TYPE_LEN                   4

/* XID */
#define ZOOKEEPER_WATCHER_EVENT_XID          -1
#define ZOOKEEPER_PING_XID                   -2
#define ZOOKEEPER_AUTH_XID                   -4
#define ZOOKEEPER_SET_WATCHES_XID            -8

/* command type */
#define ZOOKEEPER_CLOSE_OP                   -11
#define ZOOKEEPER_CONNECT_OP                 0
#define ZOOKEEPER_CREATE_OP                  1
#define ZOOKEEPER_DELETE_OP                  2
#define ZOOKEEPER_EXISTS_OP                  3
#define ZOOKEEPER_GETDATA_OP                 4
#define ZOOKEEPER_SETDATA_OP                 5
#define ZOOKEEPER_GETACL_OP                  6
#define ZOOKEEPER_SETACL_OP                  7
#define ZOOKEEPER_GETCHILDREN_OP             8
#define ZOOKEEPER_SYNC_OP                    9
#define ZOOKEEPER_GETCHILDREN2_OP            12
#define ZOOKEEPER_CHECK_OP                   13
#define ZOOKEEPER_MULTI_OP                   14
#define ZOOKEEPER_PING_OP                    11
#define ZOOKEEPER_SETWATCHES_OP              101
#define ZOOKEEPER_SETAUTH_OP                 100

/* version index */
typedef enum __INFORMIX_VER_IDX {
    INFORMIX_USVER_IDX = 0,
    INFORMIX_XPSVER8_40_IDX,
    INFORMIX_FETCHARR_IDX,
    INFORMIX_902_IDX,
    INFORMIX_903_IDX,
    INFORMIX_9301_IDX,
    INFORMIX_90303_IDX,
    INFORMIX_CURSESSINFO_IDX,
    INFORMIX_LVCGTTHAN2KSUPPORTED_IDX,
    INFORMIX_ASF_IDX,
    INFORMIX_GLS_IDX,
    INFORMIX_MULTIPLEUDROUTSUPPORTED_IDX,
    INFORMIX_REMOVE64KLIMITSUPPORTED_IDX,
    INFORMIX_SAVEPOINTSUPPORTED_IDX,
    INFORMIX_IDX9_IDX,
    INFORMIX_IDX10_IDX,
    INFORMIX_IDX18_IDX,
    INFORMIX_DESCRIBEINPUTSUPPORTED_IDX,
    INFORMIX_PRIVATESERVERENABLED_IDX,
    INFORMIX_ONlINE5SER_IDX,
    INFORMIX_NAMEDPARAMETERSSUPPORTED_IDX,
    INFORMIX_PAMAUTHENTICATION_IDX,
    INFORMIX_4BYTEOFFSETSUPPORTED_IDX,
    INFORMIX_BIGINTSUPPORTED_IDX,
    INFORMIX_SQBATCHSUPPORTED_IDX,
    INFORMIX_2GBFETCHBUFFERSUPPORTED_IDX,
    INFORMIX_END_IDX,
} INFORMIX_VER_IDX;

#endif
